package model;

import controller.GameBoard;
import model.enemies.ArmoredEnemy;
import model.enemies.Boss;
import model.enemies.HeavyEnemy;
import model.enemies.IEnemy;
import model.enemies.SpeedEnemy;

public class MoneyOnKill {
	private static Player currentPlayer;

	public static void moneyOnKill(IEnemy enemy) {
		if (enemy instanceof HeavyEnemy) {
			addMoney(75);
		}
		if (enemy instanceof SpeedEnemy) {
			addMoney(35);
		}
		if (enemy instanceof Boss) {
			addMoney(100);
		}
		if (enemy instanceof ArmoredEnemy) {
			addMoney(50);
		}
	}

	private static void addMoney(int money) {
		currentPlayer = GameBoard.getCurrentPlayer();
		int newMoney = currentPlayer.getMoney() + money;
		currentPlayer.setMoney(newMoney);
	}
}
